// EBASApp.h : main header file for the EBASAPP application
//

#if !defined(AFX_EBASAPP_H__62CA60DF_021A_4B0C_B58F_CEFB2C42EAB4__INCLUDED_)
#define AFX_EBASAPP_H__62CA60DF_021A_4B0C_B58F_CEFB2C42EAB4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif
/*
#import "C:\Programmer\Microsoft Office\Office\mso9.dll"
#import "C:\Programmer\Microsoft Office\Office\msword9.olb" no_dual_interfaces rename("ExitWindows", "ExitWindowsWord")
*/
#include "resource.h"       // main symbols
#include "importado.h"
#include "EBASApp_i.h"

extern const long WELCOME;
extern const long STAMDATA;
extern const long GRUPPE;
extern const long DATONOTAT;
extern const long OPRETGRUPPE;
extern const long GRUPPEOVERSIGT;
extern const long GRUPPEFAG;
extern const long STATUS;
extern const long FAG;
extern const long EJERFORHOLD;
extern const long KARAKTERER;
extern const long BOGPAKKER;
extern const long BETALING;

/////////////////////////////////////////////////////////////////////////////
// CEBASAppApp:
// See EBASApp.cpp for the implementation of this class
//

class CEBASAppApp : public CWinApp
{
public:
	CEBASAppApp();

	static EBASDLLLib::IEBASSystemPtr gpEbas;
	static EBASDLLLib::IBrugerSessionPtr gpEbasSession;

	static long FileSize(FILE * f)
	{
		long int s_pos,f_size;
		s_pos=ftell(f);
		fseek(f,0L,SEEK_END);
		f_size=ftell(f);
		fseek(f,s_pos,SEEK_SET);
		return(f_size);
	}

	void OnRun() 
	{
		COleVariant vFalse((short)FALSE);
		// Application app; 
/*
		Application app;  
		if(!app.CreateDispatch(__uuidof("Word.Application")))
		{
			AfxMessageBox("Couldn't start Word.");
		}

		else
		{
			COleVariant vOpt (DISP E PARAMNOTFOUND, VT ERROR);
			Documents odocs= app.GetDocuments();
			Document odoc= odocs.Add(vOpt, vOpt);
			Selection sel;
			Tables tab;
			app.SetVisible(TRUE);

			tab.Add(odocs, 5, 2);

			AfxMessageBox ("Word is Running!");
			app.Quit(vFalse, vOpt, vOpt);

		}
*/
	}

	
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CEBASAppApp)
	public:
	virtual BOOL InitInstance();
		virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
	COleTemplateServer m_server;
		// Server object for document creation
	//{{AFX_MSG(CEBASAppApp)
	afx_msg void OnAppAbout();
	afx_msg void SwitchViews(IUnknown * notat = NULL);
	afx_msg void EnableSearch();
	afx_msg void VisStamdata();
	afx_msg void VisDatoNotat(IUnknown * notat = NULL);
	afx_msg void VisVelkomst();
	afx_msg void VisOpretGruppe();
	afx_msg void VisGruppeOversigt();
	afx_msg void OnGem();
	afx_msg void OnHent();
	afx_msg void OnSlet();
	afx_msg void OnRyd();
	afx_msg void VisGruppeFag();
	afx_msg void VisStatus();
	afx_msg void VisFag();
	afx_msg void VisEjerforhold();
	afx_msg void VisKarakterer();
	afx_msg void VisBogpakker();
	afx_msg void VisBetaling();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	
public:
	static int g_nCurrentView;

private:
	BOOL m_bATLInited;
	BOOL InitATL();
	bool searchActivated;
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_EBASAPP_H__62CA60DF_021A_4B0C_B58F_CEFB2C42EAB4__INCLUDED_)
